package com.bl.student.dao.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by liangweikang on 18/1/30.
 */
@Entity
@Data
@Table(name = "PURCHASE_HISTORY")
@ApiModel(value = "PurchaseEntity", description = "购买记录表")
@DynamicInsert
@DynamicUpdate
public class PurchaseEntity {
    @Id
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "商品图")
    private String image;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "简介")
    private String description;

    @ApiModelProperty(value = "价格")
    private Long price;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "详情页id")
    @Column(name = "user_id")
    private String userId;

    @ApiModelProperty(value = "详情页id")
    @Column(name = "goods_id")
    private String goodsId;
}
